#include<iostream>
#include "operands.h"
using namespace std;
operands::operands(const string& sig):sig(sig.data()){}

operands::operands(operands& op):sig(op.sig){}

double operands::operator()(double n1, double n2)
{
    switch (sig[0])
    {
    case '+':
        return n1+n2;
        break;
    
    case '-':
        return n1-n2;
        break;

    case '*':
        return n1*n2;
        break;

    case '/':
        return n1/n2;
        break;

    default:
        break;
    }
}

operands& operands::operator=(const operands& rhs){
    sig = rhs.sig;
}
